package cn.trigram.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @see <a href="https://github.com/apache/rocketmq-spring/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98">RocketMQ文档</a>
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "local-service01-topic", consumerGroup = "local-service01-group"
    ,selectorExpression = "tags IN ('sync-send')")
public class Service01MQListener implements RocketMQListener<String> {

  public void onMessage(String message) {

    log.info("received message: {}", message);
  }

}
